package com.zhi.dao;

import com.zhi.entity.LDCode;
import com.zhi.entity.LDCodePK;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;


public interface LDCodeRepository extends JpaRepository<LDCode, LDCodePK> {

    @Query(value = "select * from ldcode where code_type = ?1" ,nativeQuery = true)
    public List<LDCode> findByCodeType(String CodeType1);

    @Query(value = "select * from ldcode where code_type = ?1 and code = ?2",nativeQuery = true)
    public LDCode findByPK(String CodeType1,String Code2);
}
